package cc.miwuya.community.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cc.miwuya.community.domain.Property;
import cc.miwuya.community.service.PropertyService;
import cc.miwuya.community.mapper.PropertyMapper;
import org.springframework.stereotype.Service;

/**
* @author 杩烽浘妫灄
* @description 针对表【property(物业表)】的数据库操作Service实现
* @createDate 2024-02-22 20:11:29
*/
@Service
public class PropertyServiceImpl extends ServiceImpl<PropertyMapper, Property>
    implements PropertyService{

    @Override
    public Object getPage(Page page, String name) {
        Page<Property> propertyPage = null;
        if (!StrUtil.isEmpty(name)){
            propertyPage = page(page,new QueryWrapper<Property>().like("name",name));
        }else {
            propertyPage = page(page,new QueryWrapper<Property>());
        }

        return propertyPage;
    }
}




